/**
 * Description:一些注释<br/>
 * CreateTime:2019-03-28<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
package cn.cnsy123.bookwebsiteserver.repository;

import javax.persistence.LockModeType;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Lock;
import org.springframework.stereotype.Repository;

import cn.cnsy123.bookwebsiteserver.entity.SysUserRoleInfo;

/**
 * Description:一些注释<br/>
 * CreateTime:2019-03-28<br/>
 * Creater: yangpengfei360@126.com <br/>
 * @author yangpengfei
 */
@Repository
public interface SysRoleInfoDao extends JpaRepository<SysUserRoleInfo, Long> {
    
    
    Page<SysUserRoleInfo> findAllByDeleteFlag(Short deleteFlag,Pageable pageable);
    
    
    @Lock(LockModeType.PESSIMISTIC_WRITE)
    SysUserRoleInfo findByRoleId(Long roleId);

}
